---@class Table_GuideVOItem
local Table_GuideVOItem = class("Table_GuideVOItem");

function Table_GuideVOItem:ctor()
    self.Id = 0;    --唯一ID
    self.FunType = 0;    --功能点类型
    self.Priority = 0;    --优先级
    self.DelayTime = 0;    --延时触发
    self.UserLv = 0;    --触发等级
    self.CheckGroupId = false;    --判断组ID
    self.JudgeTag = false;    --判断标记
    self.GroupId = 0;    --组ID
    self.PreGroupId = 0;    --前置组ID
    self.PreId = 0;    --前置引导ID
    self.NextId = 0;    --后置引导ID
    self.Finish = false;    --完成标记
    self.TaskId = 0;    --完成任务ID
    self.OpenUId = 0;    --打开UIID
    self.CloseUId = 0;    --关闭UIID
    self.WinFBId = 0;    --通关副本ID
    self.EnterFBId = 0;    --进入副本ID
    self.ItemId = 0;    --道具ID
    self.ItemCount = 0;    --道具数量
    self.EquipType = 0;    --装备类型
    self.EquipNum = 0;    --装备数量
    self.IsPause = false;    --是否暂停副本
    self.IsNewGuideUse = false;    --新手关用
    self.GotoUId = 0;    --界面ID
    self.OpenUI = {};    --共存UIID
    self.Resources = "";    --资源路径
    self.GoPath = "";    --对象路径
    self.FunParam = "";    --功能点参数
end

function Table_GuideVOItem:Load(reader)
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.Id = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.FunType = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.Priority = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.DelayTime = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.UserLv = tonumber(self.temp); end
    self.CheckGroupId = reader:ReadBool();
    self.JudgeTag = reader:ReadBool();
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.GroupId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.PreGroupId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.PreId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.NextId = tonumber(self.temp); end
    self.Finish = reader:ReadBool();
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.TaskId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.OpenUId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.CloseUId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.WinFBId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.EnterFBId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.ItemId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.ItemCount = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.EquipType = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.EquipNum = tonumber(self.temp); end
    self.IsPause = reader:ReadBool();
    self.IsNewGuideUse = reader:ReadBool();
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.GotoUId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.OpenUI = Utility.StringToNumbers(self.temp, ";"); end
    self.Resources = reader:ReadString();
    self.GoPath = reader:ReadString();
    self.FunParam = reader:ReadString();
    self.temp = nil;
end

---@class Table_GuideVOMgr : IDataMgr
local Table_GuideVOMgr = class("Table_GuideVOMgr", IDataMgr);

function Table_GuideVOMgr:FileName()
    return "Txt/GuideVO.txt";
end

---@return Table_GuideVOItem
function Table_GuideVOMgr:GetItemById(id)
    return self.super:GetItemById(id)
end

---@return Table_GuideVOItem
function Table_GuideVOMgr:GetItemByIdx(idx)
    return self.super:GetItemByIdx(idx)
end

function Table_GuideVOMgr:Load(reader)
    local item = Table_GuideVOItem.new();
    item:Load(reader);
    self.mItemDic[item.Id] = self.mDataCount;
    table.insert(self.mItemList, item);
end

return Table_GuideVOMgr;